package com.xty.xtyle.db.mix;


import org.litepal.LitePal;

import java.util.List;

public class MixDao {

    public void addMix(MixCloth mixCloth) {

    }

    public void update(MixCloth mixCloth) {
        if (null != mixCloth) {
            mixCloth.update(mixCloth.getId());
        }
    }

    public MixCloth queryById(long id) {
        return LitePal.find(MixCloth.class, id);
    }

    public List<MixCloth> queryByTime(long time) {
        return LitePal.where("time=?", String.valueOf(time)).find(MixCloth.class);
    }

    public List<MixCloth> queryAll() {
        return LitePal.findAll(MixCloth.class);
    }

    public List<MixCloth> queryAllByType(String type) {
        return LitePal.where("type=?", type).find(MixCloth.class);
    }
}
